<!DOCTYPE html>
<html lang="en" xmlns:v-bind="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <title>热门银行管理</title>
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
    <link rel="stylesheet" href="../../public/css/bootstrap.min.css">
    <link rel="stylesheet" href="../../public/css/font-awesome.min.css">
    <link rel="stylesheet" href="../../public/plugins/jqgrid/ui.jqgrid-bootstrap.css">
    <link rel="stylesheet" href="../../public/plugins/ztree/css/metroStyle/metroStyle.css">
    <!--日期选择插件-->
    <link rel="stylesheet" href="../../public/plugins/datePicker/css/flatpicker.css">

    <link rel="stylesheet" href="../../public/css/main.css">
    <script src="../../public/libs/jquery.min.js"></script>
    <script type="text/javascript" src="../../public/plugins/upload/ajaxfileupload.js"></script>
    <script src="../../public/plugins/layer/layer.js"></script>
    <script src="../../public/libs/bootstrap.min.js"></script>
    <script src="../../public/libs/vue.min.js"></script>
    <script src="../../public/plugins/jqgrid/grid.locale-cn.js"></script>
    <script src="../../public/plugins/jqgrid/jquery.jqGrid.min.js"></script>
    <script src="../../public/plugins/ztree/jquery.ztree.all.min.js"></script>
    <script src="../../public/js/common.js"></script>


</head>
<body>
<div id="app">
    <div v-show="showList">
        <div class="grid-btn">
            <div class="form-group col-sm-2" style="width: 160px;">
                <select id="select_type" v-model="selectType" class="form-control">
                    <option value="1">全部</option>
                    <option value="loan">贷款</option>
                    <option value="card">信用卡</option>
                </select>
            </div>
            <div class="form-group col-sm-2" style="width: 160px;">
                <select id="data_type" class="form-control">
                    <option value="-1">全部</option>
                    <div id="data-type-item">
                        <option v-for="item in dataTypeItem" :value="item.loanId" v-if="selectType == 'loan'">
                            {{item.loanName}}
                        </option>
                        <option v-for="item in dataTypeItem" :value="item.cardId" v-if="selectType == 'card'">
                            {{item.cardBankName}}
                        </option>
                    </div>
                </select>
            </div>
            <div class="form-group col-sm-2" style="width: 160px;">
                <input type="text" id="startDate" class="form-control" placeholder="开始时间" >
            </div>
            <div class="form-group col-sm-2" style="width: 160px;">
                <input type="text" id="endDate" class="form-control" placeholder="结束时间" >
            </div>
            <a v-if="hasPermission('sys:increRecord:list')" class="btn btn-primary" @click="query"><i class="fa fa-search"></i>&nbsp;查询</a>
            <a class="btn btn-primary" @click="reload"><i class="fa fa-resistance"></i>&nbsp;清空</a>
            <a v-if="hasPermission('sys:increRecord:list')" class="btn btn-primary" @click="download"><i class="fa fa-download"></i>&nbsp;下载</a>
        </div>
        <table id="jqGrid"></table>
        <div id="jqGridPager"></div>
    </div>

    <div v-show="!showList" class="panel panel-default">
        <div class="panel-heading">{{title}}</div>
        <form class="form-horizontal">
            <div class="form-group">
                <div class="col-sm-2 control-label">银行名字</div>
                <div class="col-sm-10">
                    <input type="text" class="form-control" v-model="record.bankName" placeholder="银行名字"/>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-2 control-label">推荐状态</div>
                <label class="radio-inline">
                    <input type="radio" name="bankHot" value="1" v-model="record.bankHot"/> 首页推荐
                </label>
                <label class="radio-inline">
                    <input type="radio" name="bankHot" value="0" v-model="record.bankHot"/> 不推荐
                </label>
            </div>
            <div class="form-group">
                <div class="col-sm-2 control-label">icon</div>
                <div class="col-sm-10">
                    <input type="file" style="display: none;" ref="inputFile" accept="image/*" name="bankIcon" id="iconInput"
                           class="form-control" placeholder="file"/>
                    <img style="border: 1px solid silver;" id="iconImage" v-bind:src="record.bankIcon" width="70"
                         height="70" alt="点击上传"/>
                </div>
            </div>
            <div class="form-group">
                <input type="button" class="btn btn-primary" @click="" value="确定"/>
                &nbsp;&nbsp;<input type="button" class="btn btn-warning" @click="reload" value="返回"/>
            </div>
        </form>
    </div>
</div>
<script src="../../public/plugins/datePicker/js/flatpicker.js"></script>
<script src="../../public/plugins/datePicker/js/zh.js"></script>
<script src="../../public/js/sys/IncreRecord.js"></script>

</body>
</html>